3.339 \(\int \frac{a+a \tan (e+f x)}{\sqrt{d \tan (e+f x)}} \, dx\)

Optimal. Leaf size=50 \[ -\frac{\sqrt{2} a \tan ^{-1}\left (\frac{\sqrt{d} (1-\tan (e+f x))}{\sqrt{2} \sqrt{d \tan (e+f x)}}\right )}{\sqrt{d} f} \]

[Out]

-((Sqrt[2]*a*ArcTan[(Sqrt[d]*(1 - Tan[e + f*x]))/(Sqrt[2]*Sqrt[d*Tan[e + f*x]])])/(Sqrt[d]*f))

________________________________________________________________________________________

Rubi [A]  time = 0.0410533, antiderivative size = 50, normalized size of antiderivative = 1., number of steps used = 2, number of rules used = 2, integrand size = 23, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.087, Rules used = {3532, 205} \[ -\frac{\sqrt{2} a \tan ^{-1}\left (\frac{\sqrt{d} (1-\tan (e+f x))}{\sqrt{2} \sqrt{d \tan (e+f x)}}\right )}{\sqrt{d} f} \]

Antiderivative was successfully verified.

[In]

Int[(a + a*Tan[e + f*x])/Sqrt[d*Tan[e + f*x]],x]

[Out]

-((Sqrt[2]*a*ArcTan[(Sqrt[d]*(1 - Tan[e + f*x]))/(Sqrt[2]*Sqrt[d*Tan[e + f*x]])])/(Sqrt[d]*f))

Rule 3532

Int[((c_) + (d_.)*tan[(e_.) + (f_.)*(x_)])/Sqrt[(b_.)*tan[(e_.) + (f_.)*(x_)]], x_Symbol] :> Dist[(-2*d^2)/f,
Subst[Int[1/(2*c*d + b*x^2), x], x, (c - d*Tan[e + f*x])/Sqrt[b*Tan[e + f*x]]], x] /; FreeQ[{b, c, d, e, f}, x
] && EqQ[c^2 - d^2, 0]

Rule 205

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[a/b, 2]*ArcTan[x/Rt[a/b, 2]])/a, x] /; FreeQ[{a, b}, x]
&& PosQ[a/b]

Rubi steps

\begin{align*} \int \frac{a+a \tan (e+f x)}{\sqrt{d \tan (e+f x)}} \, dx &=-\frac{\left (2 a^2\right ) \operatorname{Subst}\left (\int \frac{1}{2 a^2+d x^2} \, dx,x,\frac{a-a \tan (e+f x)}{\sqrt{d \tan (e+f x)}}\right )}{f}\\ &=-\frac{\sqrt{2} a \tan ^{-1}\left (\frac{\sqrt{d} (1-\tan (e+f x))}{\sqrt{2} \sqrt{d \tan (e+f x)}}\right )}{\sqrt{d} f}\\ \end{align*}

Mathematica [C]  time = 0.0791095, size = 74, normalized size = 1.48 \[ -\frac{(1-i) \sqrt [4]{-1} a \sqrt{\tan (e+f x)} \left (\tan ^{-1}\left ((-1)^{3/4} \sqrt{\tan (e+f x)}\right )+i \tanh ^{-1}\left ((-1)^{3/4} \sqrt{\tan (e+f x)}\right )\right )}{f \sqrt{d \tan (e+f x)}} \]

Antiderivative was successfully verified.

[In]

Integrate[(a + a*Tan[e + f*x])/Sqrt[d*Tan[e + f*x]],x]

[Out]

((-1 + I)*(-1)^(1/4)*a*(ArcTan[(-1)^(3/4)*Sqrt[Tan[e + f*x]]] + I*ArcTanh[(-1)^(3/4)*Sqrt[Tan[e + f*x]]])*Sqrt
[Tan[e + f*x]])/(f*Sqrt[d*Tan[e + f*x]])

________________________________________________________________________________________

Maple [B]  time = 0.036, size = 327, normalized size = 6.5 \begin{align*}{\frac{a\sqrt{2}}{4\,fd}\sqrt [4]{{d}^{2}}\ln \left ({ \left ( d\tan \left ( fx+e \right ) +\sqrt [4]{{d}^{2}}\sqrt{d\tan \left ( fx+e \right ) }\sqrt{2}+\sqrt{{d}^{2}} \right ) \left ( d\tan \left ( fx+e \right ) -\sqrt [4]{{d}^{2}}\sqrt{d\tan \left ( fx+e \right ) }\sqrt{2}+\sqrt{{d}^{2}} \right ) ^{-1}} \right ) }+{\frac{a\sqrt{2}}{2\,fd}\sqrt [4]{{d}^{2}}\arctan \left ({\sqrt{2}\sqrt{d\tan \left ( fx+e \right ) }{\frac{1}{\sqrt [4]{{d}^{2}}}}}+1 \right ) }-{\frac{a\sqrt{2}}{2\,fd}\sqrt [4]{{d}^{2}}\arctan \left ( -{\sqrt{2}\sqrt{d\tan \left ( fx+e \right ) }{\frac{1}{\sqrt [4]{{d}^{2}}}}}+1 \right ) }+{\frac{a\sqrt{2}}{4\,f}\ln \left ({ \left ( d\tan \left ( fx+e \right ) -\sqrt [4]{{d}^{2}}\sqrt{d\tan \left ( fx+e \right ) }\sqrt{2}+\sqrt{{d}^{2}} \right ) \left ( d\tan \left ( fx+e \right ) +\sqrt [4]{{d}^{2}}\sqrt{d\tan \left ( fx+e \right ) }\sqrt{2}+\sqrt{{d}^{2}} \right ) ^{-1}} \right ){\frac{1}{\sqrt [4]{{d}^{2}}}}}+{\frac{a\sqrt{2}}{2\,f}\arctan \left ({\sqrt{2}\sqrt{d\tan \left ( fx+e \right ) }{\frac{1}{\sqrt [4]{{d}^{2}}}}}+1 \right ){\frac{1}{\sqrt [4]{{d}^{2}}}}}-{\frac{a\sqrt{2}}{2\,f}\arctan \left ( -{\sqrt{2}\sqrt{d\tan \left ( fx+e \right ) }{\frac{1}{\sqrt [4]{{d}^{2}}}}}+1 \right ){\frac{1}{\sqrt [4]{{d}^{2}}}}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a+a*tan(f*x+e))/(d*tan(f*x+e))^(1/2),x)

[Out]

1/4/f*a/d*(d^2)^(1/4)*2^(1/2)*ln((d*tan(f*x+e)+(d^2)^(1/4)*(d*tan(f*x+e))^(1/2)*2^(1/2)+(d^2)^(1/2))/(d*tan(f*
x+e)-(d^2)^(1/4)*(d*tan(f*x+e))^(1/2)*2^(1/2)+(d^2)^(1/2)))+1/2/f*a/d*(d^2)^(1/4)*2^(1/2)*arctan(2^(1/2)/(d^2)
^(1/4)*(d*tan(f*x+e))^(1/2)+1)-1/2/f*a/d*(d^2)^(1/4)*2^(1/2)*arctan(-2^(1/2)/(d^2)^(1/4)*(d*tan(f*x+e))^(1/2)+
1)+1/4/f*a/(d^2)^(1/4)*2^(1/2)*ln((d*tan(f*x+e)-(d^2)^(1/4)*(d*tan(f*x+e))^(1/2)*2^(1/2)+(d^2)^(1/2))/(d*tan(f
*x+e)+(d^2)^(1/4)*(d*tan(f*x+e))^(1/2)*2^(1/2)+(d^2)^(1/2)))+1/2/f*a/(d^2)^(1/4)*2^(1/2)*arctan(2^(1/2)/(d^2)^
(1/4)*(d*tan(f*x+e))^(1/2)+1)-1/2/f*a/(d^2)^(1/4)*2^(1/2)*arctan(-2^(1/2)/(d^2)^(1/4)*(d*tan(f*x+e))^(1/2)+1)

________________________________________________________________________________________

Maxima [F(-2)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: ValueError} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+a*tan(f*x+e))/(d*tan(f*x+e))^(1/2),x, algorithm="maxima")

[Out]

Exception raised: ValueError

________________________________________________________________________________________

Fricas [A]  time = 1.66409, size = 358, normalized size = 7.16 \begin{align*} \left [\frac{\sqrt{2} a \sqrt{-\frac{1}{d}} \log \left (\frac{2 \, \sqrt{2} \sqrt{d \tan \left (f x + e\right )} \sqrt{-\frac{1}{d}}{\left (\tan \left (f x + e\right ) - 1\right )} + \tan \left (f x + e\right )^{2} - 4 \, \tan \left (f x + e\right ) + 1}{\tan \left (f x + e\right )^{2} + 1}\right )}{2 \, f}, \frac{\sqrt{2} a \arctan \left (\frac{\sqrt{2} \sqrt{d \tan \left (f x + e\right )}{\left (\tan \left (f x + e\right ) - 1\right )}}{2 \, \sqrt{d} \tan \left (f x + e\right )}\right )}{\sqrt{d} f}\right ] \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+a*tan(f*x+e))/(d*tan(f*x+e))^(1/2),x, algorithm="fricas")

[Out]

[1/2*sqrt(2)*a*sqrt(-1/d)*log((2*sqrt(2)*sqrt(d*tan(f*x + e))*sqrt(-1/d)*(tan(f*x + e) - 1) + tan(f*x + e)^2 -
 4*tan(f*x + e) + 1)/(tan(f*x + e)^2 + 1))/f, sqrt(2)*a*arctan(1/2*sqrt(2)*sqrt(d*tan(f*x + e))*(tan(f*x + e)
- 1)/(sqrt(d)*tan(f*x + e)))/(sqrt(d)*f)]

________________________________________________________________________________________

Sympy [F]  time = 0., size = 0, normalized size = 0. \begin{align*} a \left (\int \frac{1}{\sqrt{d \tan{\left (e + f x \right )}}}\, dx + \int \frac{\tan{\left (e + f x \right )}}{\sqrt{d \tan{\left (e + f x \right )}}}\, dx\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+a*tan(f*x+e))/(d*tan(f*x+e))**(1/2),x)

[Out]

a*(Integral(1/sqrt(d*tan(e + f*x)), x) + Integral(tan(e + f*x)/sqrt(d*tan(e + f*x)), x))

________________________________________________________________________________________

Giac [B]  time = 1.21645, size = 313, normalized size = 6.26 \begin{align*} \frac{\sqrt{2}{\left (a d \sqrt{{\left | d \right |}} + a{\left | d \right |}^{\frac{3}{2}}\right )} \arctan \left (\frac{\sqrt{2}{\left (\sqrt{2} \sqrt{{\left | d \right |}} + 2 \, \sqrt{d \tan \left (f x + e\right )}\right )}}{2 \, \sqrt{{\left | d \right |}}}\right )}{2 \, d^{2} f} + \frac{\sqrt{2}{\left (a d \sqrt{{\left | d \right |}} + a{\left | d \right |}^{\frac{3}{2}}\right )} \arctan \left (-\frac{\sqrt{2}{\left (\sqrt{2} \sqrt{{\left | d \right |}} - 2 \, \sqrt{d \tan \left (f x + e\right )}\right )}}{2 \, \sqrt{{\left | d \right |}}}\right )}{2 \, d^{2} f} + \frac{\sqrt{2}{\left (a d \sqrt{{\left | d \right |}} - a{\left | d \right |}^{\frac{3}{2}}\right )} \log \left (d \tan \left (f x + e\right ) + \sqrt{2} \sqrt{d \tan \left (f x + e\right )} \sqrt{{\left | d \right |}} +{\left | d \right |}\right )}{4 \, d^{2} f} - \frac{\sqrt{2}{\left (a d \sqrt{{\left | d \right |}} - a{\left | d \right |}^{\frac{3}{2}}\right )} \log \left (d \tan \left (f x + e\right ) - \sqrt{2} \sqrt{d \tan \left (f x + e\right )} \sqrt{{\left | d \right |}} +{\left | d \right |}\right )}{4 \, d^{2} f} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+a*tan(f*x+e))/(d*tan(f*x+e))^(1/2),x, algorithm="giac")

[Out]

1/2*sqrt(2)*(a*d*sqrt(abs(d)) + a*abs(d)^(3/2))*arctan(1/2*sqrt(2)*(sqrt(2)*sqrt(abs(d)) + 2*sqrt(d*tan(f*x +
e)))/sqrt(abs(d)))/(d^2*f) + 1/2*sqrt(2)*(a*d*sqrt(abs(d)) + a*abs(d)^(3/2))*arctan(-1/2*sqrt(2)*(sqrt(2)*sqrt
(abs(d)) - 2*sqrt(d*tan(f*x + e)))/sqrt(abs(d)))/(d^2*f) + 1/4*sqrt(2)*(a*d*sqrt(abs(d)) - a*abs(d)^(3/2))*log
(d*tan(f*x + e) + sqrt(2)*sqrt(d*tan(f*x + e))*sqrt(abs(d)) + abs(d))/(d^2*f) - 1/4*sqrt(2)*(a*d*sqrt(abs(d))
- a*abs(d)^(3/2))*log(d*tan(f*x + e) - sqrt(2)*sqrt(d*tan(f*x + e))*sqrt(abs(d)) + abs(d))/(d^2*f)